package com.ceair.flight.refund.location.model;

import com.ceair.flight.refund.util.DateUtil;
import com.ceair.flight.refund.util.StringUtil;
import com.ceair.muservice.common.dto.AbstractBaseDO;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;


public class OrderDO extends AbstractBaseDO implements Serializable{ // 订单主表

    private static final long serialVersionUID = -7012387269310791908L;
    /**
     * 订单号 *
     */
    private String orderNo;
    /**
     * 外部订单号 *
     */
    private String extreFno;
    /**
     * 订单状态 1新建 2 取消 3 有效*
     */
    private String orderSt;
    /**
     * 订单渠道 *
     */
    private String channel;
    /**
     * 站点 *
     */
    private String site;
    /**
     * 来源ip *
     */
    private String sourceIp;
    /**
     * 联系人姓名 *
     */
    private String contactNm;
    /**
     * 联系人电话 *
     */
    private String contactTel;
    /**
     * 联系邮箱 *
     */
    private String contactEmail;
    /**
     * 币种 *
     */
    private String currency;
    /**
     * 订单总票面价 *
     */
    private BigDecimal fcNy;
    /**
     * 订单总销售价 *
     */
    private BigDecimal scNy;
    /**
     * 订单总税费 *
     */
    private BigDecimal taxAm;
    /**
     * 订单总代理费 *
     */
    private BigDecimal agentAm;
    /**
     * 代理人id *
     */
    private String agentId;
    /**
     * 大区id *
     */
    private String regionId;
    /**
     * 营业部id *
     */
    private String departmentId;
    /**
     * IATA *
     */
    private String iaTa;
    /**
     * OFFICE_NO *
     */
    private String officeNo;
    /**
     * 代理人所在营业部折扣 *
     */
    private Long dDiscount;
    /**
     * 大客户号 *
     */
    private String kamNo;
    /**
     * 订单日志 *
     */
//    private Set<MemoDO> orderLogs;
    /**
     * 飞机订单 *
     */
    private Set<FlightOrderDO> flightOrders;
    /**
     * emd订单 *
     */
    private Set<EmdOrderDO> emdOrders;
    /**
     * wifi订单*
     */
    private Set<WifiOrderDO> wifiOrders;
    /**
     * 行李订单*
     */
//    private Set<BageOrderDO> bageOrders;
    /**
     * 高铁订单*
     */
//    private Set<GaotieOrderDO> gaotieOrders;
    /**
     * 支付信息*
     */
    private Set<PayDO> payInfos;

    /**
     * 来源
     * @return
     */
    private String source;

    /**
     * 国家
     * @return
     */
    private String country;

    /**
     * 语言
     * @return
     */
    private String language;


    public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getExtreFno() {
        return extreFno;
    }

    public void setExtreFno(String extreFno) {
        this.extreFno = extreFno;
    }

    public String getOrderSt() {
        return orderSt;
    }

    public void setOrderSt(String orderSt) {
        this.orderSt = orderSt;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getSite() {
        return site;
    }

    public void setSite(String site) {
        this.site = site;
    }

    public String getSourceIp() {
        return sourceIp;
    }

    public void setSourceIp(String sourceIp) {
        this.sourceIp = sourceIp;
    }

    public String getContactNm() {
        return contactNm;
    }

    public void setContactNm(String contactNm) {
        this.contactNm = contactNm;
    }

    public String getContactTel() {
        return contactTel;
    }

    public void setContactTel(String contactTel) {
        this.contactTel = contactTel;
    }

    public String getContactEmail() {
        return contactEmail;
    }

    public void setContactEmail(String contactEmail) {
        this.contactEmail = contactEmail;
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public BigDecimal getFcNy() {
        return fcNy;
    }

    public void setFcNy(BigDecimal fcNy) {
        this.fcNy = fcNy;
    }

    public BigDecimal getScNy() {
        return scNy;
    }

    public void setScNy(BigDecimal scNy) {
        this.scNy = scNy;
    }

    public BigDecimal getTaxAm() {
        return taxAm;
    }

    public void setTaxAm(BigDecimal taxAm) {
        this.taxAm = taxAm;
    }

    public BigDecimal getAgentAm() {
        return agentAm;
    }

    public void setAgentAm(BigDecimal agentAm) {
        this.agentAm = agentAm;
    }

    public String getAgentId() {
        return agentId;
    }

    public void setAgentId(String agentId) {
        this.agentId = agentId;
    }

    public String getRegionId() {
        return regionId;
    }

    public void setRegionId(String regionId) {
        this.regionId = regionId;
    }

    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    public String getIaTa() {
        return iaTa;
    }

    public void setIaTa(String iaTa) {
        this.iaTa = iaTa;
    }

    public String getOfficeNo() {
        return officeNo;
    }

    public void setOfficeNo(String officeNo) {
        this.officeNo = officeNo;
    }

    public Long getDDiscount() {
        return dDiscount;
    }

    public void setDDiscount(Long dDiscount) {
        this.dDiscount = dDiscount;
    }

    public String getKamNo() {
        return kamNo;
    }

    public void setKamNo(String kamNo) {
        this.kamNo = kamNo;
    }

//    @Transient
//    public Set<MemoDO> getOrderLogs() {
//        return orderLogs;
//    }

    public void setFlightOrders(Set<FlightOrderDO> flightOrders) {
        this.flightOrders = flightOrders;
    }

    public Set<FlightOrderDO> getFlightOrders() {
        return flightOrders;
    }

    public void addFlightOrder(FlightOrderDO flightOrder) {
        if (this.flightOrders == null) {
            this.flightOrders = new HashSet<>();
        }
        this.flightOrders.add(flightOrder);
    }

    public Set<EmdOrderDO> getEmdOrders() {
        return emdOrders;
    }

    public void setEmdOrders(Set<EmdOrderDO> emdOrders) {
        this.emdOrders = emdOrders;
    }

//    public void setOrderLogs(Set<MemoDO> orderLogs) {
//        this.orderLogs = orderLogs;
//    }


    public Set<WifiOrderDO> getWifiOrders() {
        return wifiOrders;
    }

    public void setWifiOrders(Set<WifiOrderDO> wifiOrders) {
        this.wifiOrders = wifiOrders;
    }

//    @Transient
//   	public Set<BageOrderDO> getBageOrders() {
//   		return bageOrders;
//   	}
//
//   	public void setBageOrders(Set<BageOrderDO> bageOrders) {
//   		this.bageOrders = bageOrders;
//   	}
//
//	@Transient
//	public Set<GaotieOrderDO> getGaotieOrders() {
//		return gaotieOrders;
//	}
//
//	public void setGaotieOrders(Set<GaotieOrderDO> gaotieOrders) {
//		this.gaotieOrders = gaotieOrders;
//	}

    public Set<PayDO> getPayInfos() {
        return payInfos;
    }

    public void setPayInfos(Set<PayDO> payInfos) {
        this.payInfos = payInfos;
    }



	@Override
	public String toString() {
		return  orderNo + StringUtil.SEPARATOR + extreFno + StringUtil.SEPARATOR + orderSt + StringUtil.SEPARATOR
				+ channel + StringUtil.SEPARATOR + site + StringUtil.SEPARATOR + sourceIp + StringUtil.SEPARATOR + contactNm + StringUtil.SEPARATOR
				+ contactTel + StringUtil.SEPARATOR + contactEmail + StringUtil.SEPARATOR + currency + StringUtil.SEPARATOR + fcNy
				+ StringUtil.SEPARATOR + scNy + StringUtil.SEPARATOR + taxAm + StringUtil.SEPARATOR + agentAm + StringUtil.SEPARATOR + agentId
				+ StringUtil.SEPARATOR + regionId + StringUtil.SEPARATOR + departmentId + StringUtil.SEPARATOR + iaTa + StringUtil.SEPARATOR
				+ officeNo + StringUtil.SEPARATOR + dDiscount + StringUtil.SEPARATOR + kamNo
				+ StringUtil.SEPARATOR+createId+ StringUtil.SEPARATOR + DateUtil.toString(createDtm, StringUtil.DATEFORMATE)
				+ StringUtil.SEPARATOR+updateId+ StringUtil.SEPARATOR + DateUtil.toString(updateDtm, StringUtil.DATEFORMATE)+ StringUtil.SEPARATOR+version+ StringUtil.SEPARATOR+deleted;
	}

}
